<template>
  <el-menu :default-active="$route.path" :router="true">
    <MenuItem v-for="item in menuList" :item="item" :key="item.url"></MenuItem>
  </el-menu>
</template>

<script setup lang="ts">
  import { useUserStore } from '@/store/auth';
  import { storeToRefs } from 'pinia';
  import MenuItem from '@/components/Menu/MenuItem/index.vue';

  const userStore = useUserStore();
  const { menuList } = storeToRefs(userStore);
</script>

<style scoped></style>
